package com.jiaai.web.gift;

import com.alibaba.dubbo.config.annotation.Reference;
import com.jiaai.gift.api.IClubApi;
import com.jiaai.util.RestResultGenerator;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * class_name:ZClubController
 * describe:------------------>至尊俱乐部
 * create_user:张昉平
 * create_date:2018/1/27
 * create_time:17:46
 */
@RestController
@RequestMapping("/api/v1/app/club")
public class ZClubController {

    @Reference
    private IClubApi clubApi;

    @GetMapping("/members")
    public Object members(){
        try {
            return RestResultGenerator.genSuccessResult(clubApi.getAppList());
        }catch (Exception e){
            e.printStackTrace();
            return RestResultGenerator.genErrorResult("失败");
        }
    }
}
